<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr>
		<td   colspan="6" class="t_bar2">基本信息</td>
		
	</tr>
	<tr>
		<td   align="right"><span class="color_red">*</span>项目名称：</td>
		<td  colspan="5">
			<input id="zh_title" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>项目性质：</td>
	<td nowrap  colspan="3" valign="middle">
	<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="prjnature" label="新建" value="01" /><span style="vertical-align: middle;">新建</span></label> 
	<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="prjnature" label="续建" value="02" /><span style="vertical-align: middle;">续建</span></label> 
	<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="prjnature" label="扩建" value="03" /><span style="vertical-align: middle;">扩建</span></label>
	<input type="hidden" name="proposal/prjnature_value" id="prjnature_value" class="required" value="<x:out select="$xmlData/data/proposal/prjnature_value" />" label="项目性质" /> 
	<input type="hidden" name="proposal/prjnature_name" id="prjnature_name" value="<x:out select="$xmlData/data/proposal/prjnature_name" />" label="项目性质" /></td>
	</tr>
	<tr>
		<td width="135" align="right"><span class="color_red">*</span>项目实施地点：</td>
		<td colspan="3"><input name="proposal/address" label="项目实施地点"
			type="text" required class="input_css required maxlength:100"
			style="width: 725px;" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/address" />" /></td>
	</tr>
	<tr>
      	<td  align="right" nowrap><span class="color_red">*</span>开始日期：</td>
		<td >
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="开始日期" ></cpt:date> 
		</td>
		<td  align="right" nowrap><span class="color_red">*</span>结束日期：</td>
		<td  >
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" className="required date" label="结束日期"  value="${end_date}" ></cpt:date> 
		</td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>主要技术来源：</td>
	<td nowrap  colspan="3" valign="middle">
	<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="technologyfrom" label="自有技术" value="01" /><span style="vertical-align: middle;">自有技术</span></label> 
	<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="technologyfrom" label="产学研合作" value="02" /><span style="vertical-align: middle;">产学研合作</span></label> 
	<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="technologyfrom" label="其他" value="03" /><span style="vertical-align: middle;">其他</span></label>
	<input type="hidden" name="proposal/technologyfrom_value" id="technologyfrom_value" class="required" value="<x:out select="$xmlData/data/proposal/technologyfrom_value" />" label="主要技术来源" /> 
	<input type="hidden" name="proposal/technologyfrom_name" id="technologyfrom_name" value="<x:out select="$xmlData/data/proposal/technologyfrom_name" />" label="主要技术来源" /></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>项目技术类型：</td>
	<td nowrap  colspan="3" valign="middle">
	<label> <input type="checkbox" class="do " id="advant_01" style="vertical-align: middle;" name="technologytype" label="新技术" value="01" /><span style="vertical-align: middle;">新技术</span></label> 
	<label> <input type="checkbox" class="do " id="advant_02" style="vertical-align: middle;" name="technologytype" label="新工艺" value="02" /><span style="vertical-align: middle;">新工艺</span></label> 
	<label> <input type="checkbox" class="do " id="advant_03" style="vertical-align: middle;" name="technologytype" label="新方法" value="03" /><span style="vertical-align: middle;">新方法</span></label>
	<label> <input type="checkbox" class="do " id="advant_04" style="vertical-align: middle;" name="technologytype" label="新材料" value="04" /><span style="vertical-align: middle;">新材料</span></label>
	<label> <input type="checkbox" class="do " id="advant_05" style="vertical-align: middle;" name="technologytype" label="其他" value="05" /><span style="vertical-align: middle;">其他</span></label>
	<input type="hidden" name="proposal/technologytype_value" id="technologytype_value" class="required" value="<x:out select="$xmlData/data/proposal/technologytype_value" />" label="项目技术类型" /> 
	<input type="hidden" name="proposal/technologytype_name" id="technologytype_name" value="<x:out select="$xmlData/data/proposal/technologytype_name" />" label="项目技术类型" /></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>项目所属类别：</td>
	<td nowrap  colspan="3" valign="middle">
	<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="granttype" label="机电" value="01" /><span style="vertical-align: middle;">机电</span></label> 
	<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="granttype" label="高新技术" value="02" /><span style="vertical-align: middle;">高新技术</span></label> 
	<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="granttype" label="农轻纺" value="03" /><span style="vertical-align: middle;">农轻纺</span></label>
	<label> <input type="radio" class="do " id="advant_04" style="vertical-align: middle;" name="granttype" label="其他" value="04" /><span style="vertical-align: middle;">其他</span></label>
	<input type="hidden" name="proposal/granttype_value" id="granttype_value" class="required" value="<x:out select="$xmlData/data/proposal/granttype_value" />" label="项目所属类别" /> 
	<input type="hidden" name="proposal/granttype_name" id="granttype_name" value="<x:out select="$xmlData/data/proposal/granttype_name" />" label="项目所属类别" /></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>出口总额（万美元）：</td>
	<td >
	<input  name="proposal/export"   label="出口总额" type="text"  class="input_css required" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/export" />"/> 
	</td>
	<td align="right"><span class="color_red">*</span>同比增幅（%）：</td>
	<td >
	<input  name="proposal/export_pre"   label="出口总额-->同比增幅" type="text"  class="input_css required" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)"  value="<x:out select="$xmlData/data/proposal/export_pre" />"/> 
	</td>
	</tr>
	<tr>
	<td align="right" nowrap><span class="color_red">*</span>自营出口金额（万美元）：</td>
	<td >
	<input  name="proposal/zy_export"   label="自营出口金额" type="text"  class="input_css required" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/zy_export" />"/> 
	</td>
	<td align="right"><span class="color_red">*</span>同比增幅（%）：</td>
	<td >
	<input  name="proposal/zy_export_pre"   label="自营出口金额-->同比增幅" type="text"  class="input_css required" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)"  value="<x:out select="$xmlData/data/proposal/zy_export_pre" />"/> 
	</td>
	</tr>
	<tr>
	    <td  align="right" nowrap><span class="color_red">*</span>申报日期：</td>
		<td colspan="5">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
		</td>
	</tr>
	</table>

	<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
	
	
	<tr>
		<td   colspan="6" class="t_bar2">申报项目资金情况</td>
		
	</tr>
	<tr>
		<td  width="135" align="right"  >项目类别：</td>
		<td   colspan="5"><x:out select="$xmlData/data/proposal/grant_name" />
		</td> 
		
	</tr>
	<tr>
	<td   align="right">申请金额（万元）：</td>
	    <td >
	    <input  name="proposal/sqje" id="sqje" class="gray " disabled label="申请金额" type="text" required class="input_css required" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/sqje" />"/> 
	    </td>
	    <td  align="right"  ><span class="color_red">*</span>项目核准或备案文号：</td>
		<td  colspan="3"  > <input  name="proposal/project_approval"  label="项目核准或备案文号" type="text" maxlength="30" class="input_css required" value="<x:out select="$xmlData/data/proposal/project_approval" />"/>
		</td>
		
	</tr>
	<tr>
		<td align="right" nowrap>项目计划投入总额（万元）：</td>
		<td colspan="1"><input name="proposal/investment_budget" id="investment_budget"
			 label="项目计划投入总额" type="text" class="input_css  gray" disabled
			style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/investment_budget" />" /></td>
		<td align="right" nowrap>上年度已完成投资（万元）：</td>
		<td colspan="3"><input name="proposal/finsh_budget" id="finsh_budget"
			 label="上年度已完成投资" type="text" 
			class="input_css  gray"  disabled style="text-align: right"
			onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/finsh_budget" />" /></td>
	</tr>
	<tr>
	<td  align="right">支持方式：</td>
		<td  >
			<span name="proposal/sponsor_category"><x:out select="$xmlData/data/proposal/sponsor_category" /></span> 
		</td>
		
		<td  align="right">资金级次：</td>
		<td colspan="3">
		<span  name="proposal/fund_level">市级</span>
		</td>
	</tr>
	<tr>
	<td  align="right" nowrap>归口管理部门：</td>
		<td  ><span name="proposal/org_name">无锡市商务局</span> </td>
	    <td  align="right">管理类别：</td>
		<td  colspan="3">
		<span name="proposal/manage_category"><x:out select="$xmlData/data/proposal/manage_category" /></span>
		</td>
		
	</tr>
	<tr>
		<td  align="right" nowrap><span class="color_red">*</span>项目所属产业：</td>
		<td nowrap colspan="5">
			<c:set var="industry"><x:out select="$xmlData/data/proposal/industry_value" /></c:set>
			<cpt:checkbox key="industry" name="industry" repeatColumn="5" style="border: 0px; padding: 0px; margin: 0px;float:left;"></cpt:checkbox>
			<input type="hidden" id="industry_value" name="proposal/industry_value" class="required" value="${industry}" label="项目所属产业">
			<input type="hidden" name="proposal/industry_name" value="<x:out select="$xmlData/data/proposal/industry_name" />">
		</td>
	</tr>
	<tr>
	    <td  align="right">功能分类：</td>
		<td  colspan="5">
		<span name="proposal/grant_function"><x:out select="$xmlData/data/proposal/grant_function" /></span>
		</td>
		
	</tr>
	</table>
	<table  width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<td    class="t_bar2">申请资助依据条款</td>
		
	</tr>
	<tr>
		<td >
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span name="proposal/policy_foundation"><x:out select="$xmlData/data/proposal/policy_foundation" /></span> 
		</td>
	</tr>
</table>
<br/>


	<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org1">
	
	<tr>
		<td    class="t_bar2" colspan="4">合作参与单位信息</td>
		
	</tr>
	<tr>
		<td    class="t_bar2" colspan="4">合作单位信息1</td>
		
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name1" label="合作单位信息1" type="text"  class="input_css " onchange="cydw('org1');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name1" />"/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color2" style="display:none">*</span>单位地址：</td>
		<td colspan="3">
		<input  name="proposal/address1" label="合作单位信息1-->地址" type="text"  class="input_css " onchange="cydw('org1');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/address1" />"/>
		</td>
	</tr>
	<tr>
	<td width="14%" align="right"><span class="color_red" id="color3" style="display:none">*</span>注册类型：</td>
          <td width="38%" align="left" colspan="1" >
          	<c:set var="nature1">{'id':'<x:out select="$xmlData/data/proposal/nature1_code" />','name':'<x:out select="$xmlData/data/proposal/nature1_name" />'}</c:set>
          	<cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature1}"  label="合作单位信息1-->注册类型"
          		id="nature1" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="nature1_code" type="hidden" name="proposal/nature1_code" class="" label="合作单位信息1-->注册类型" value="<x:out select="$xmlData/data/proposal/nature1_code" />"/>
            <input id="nature1_name" type="hidden" name="proposal/nature1_name"  value="<x:out select="$xmlData/data/proposal/nature1_name" />"/>
          </td>
	<td align="right"><span class="color_red" id="color4" style="display:none">*</span>组织机构代码：</td>
	<td><input  name="proposal/org_no1" label="合作单位信息1-->组织机构代码" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/org_no1" />"/></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>联系人：</td>
	<td><input  name="proposal/lxr_name1" label="合作单位信息1-->联系人姓名" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_name1" />"/></td>
	<td align="right"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel1" label="合作单位信息1-->联系人电话" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel1" />"/></td>
	</tr>
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org2">
<tr>
		<td    class="t_bar2" colspan="4">合作单位信息2</td>
		
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name2" label="合作单位信息2" type="text" required class="input_css " onchange="cydw('org2');"  style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name2" />"/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color2" style="display:none">*</span>单位地址：</td>
		<td colspan="3">
		<input  name="proposal/address2" label="合作单位信息2-->地址" type="text" required class="input_css " onchange="cydw('org2');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/address2" />"/>
		</td>
	</tr>
	<tr>
	<td width="14%" align="right"><span class="color_red" id="color3" style="display:none">*</span>注册类型：</td>
          <td width="38%" align="left" colspan="1" >
          	<c:set var="nature2">{'id':'<x:out select="$xmlData/data/proposal/nature2_code" />','name':'<x:out select="$xmlData/data/proposal/nature2_name" />'}</c:set>
          	<cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature2}" label="合作单位信息2-->注册类型"
          		id="nature2" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="nature2_code" type="hidden" name="proposal/nature2_code"  class="" label="合作单位信息2-->注册类型" value="<x:out select="$xmlData/data/proposal/nature2_code" />"/>
            <input id="nature2_name" type="hidden" name="proposal/nature2_name"  value="<x:out select="$xmlData/data/proposal/nature2_name" />"/>
          </td>
	<td align="right"><span class="color_red" id="color4" style="display:none">*</span>组织机构代码：</td>
	<td><input  name="proposal/org_no2" label="合作单位信息2-->组织机构代码" type="text"  class="input_css " onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/org_no2" />"/></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>联系人：</td>
	<td><input  name="proposal/lxr_name2" label="合作单位信息2-->联系人姓名" type="text"  class="input_css "  onchange="cydw('org2');" maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_name2" />"/></td>
	<td align="right"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel2" label="合作单位信息2-->联系人电话" type="text"  class="input_css " onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel2" />"/></td>
	</tr>
</table>
<br/>
<table class="t_css" width="100%" border="0" cellpadding="0" 
	cellspacing="1" id="info5">
	<tr>
		<td class="t_bar2" colspan="8">人员信息
		</td>
<tr>
		<td  align="right"><span class="color_red">*</span>项目联系人：</td>
		<td>
			<input  name="proposal/contact_psn_cname" label="项目联系人" type="text" required class="input_css required"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
			<input  name="proposal/contact_psn_tel" label="联系电话" type="text" required class="input_css required"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
			<input  name="proposal/contact_psn_mobile" label="联系手机" type="text" maxlength="11" required class="input_css required mobile"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td  >
			<input  name="proposal/contact_psn_email" label="电子邮箱" type="text" required class="input_css required email"   maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/> 
		</td>
	</tr>
	
		<tr>
		<td  align="right">项目负责人：</td>
		<td>
			<input  name="proposal/fzr_psncode" type="hidden" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/psn_code" />"/> 
		    
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		    <c:set var="psnCode"><x:out select="$xmlData/data/proposal/psn_code" /></c:set>
		    <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
				<span id="personSelect">
				<input type="button" class="button_02" style="height: 25px; padding: 1px;" id="selectPsn" value="设置">
				<cpt:personSelect key="personSelect"  addRole="3"  psnCode="${psnCode}" callback="selectPsnCall" bindEvent="click" bindObject="selectPsn" title="设置项目负责人" fltFile="personSelector.ftl"></cpt:personSelect>
				</span>
			</security:authorize>
		
		</td>
		<security:authorize ifNotGranted="A_DAILU_PROPOSAL"> 
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		</security:authorize>
		<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
		<input name="proposal/fzr_tel" label="项目负责人联系电话" type="text" required  class="input_css required"  onchange="synFzrMsg(1)"  maxlength="50"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" />"/>
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
		<input name="proposal/fzr_mobile" label="项目负责人联系手机" type="text" onchange="synFzrMsg(1)" onfocus="InitInput.setNumber(this,11,0,0)"  maxlength="11"  class="input_css required mobile"   value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />"/>
		</td>
		</security:authorize>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
		
		</tr>
</table>

<script type="text/javascript">
$(function(){
	cydw('org1');
	cydw('org2');
});
function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}


function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
}
function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
}
</script>



